public class BronKerboschBipartiteUtils
extends java.lang.Object
| Constructor and Description |
|---|
BronKerboschBipartiteUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.ArrayList<java.util.ArrayList<Node>> |
bipartiteDivision(Graph existingGraph)
Divides the given graph into bipartite sets.
|
static java.util.ArrayList<java.util.ArrayList<Node>> |
constructArrayList(java.util.Set<Node> groupA,
java.util.Set<Node> groupB)
Constructs array list of array lists from sets.
|
private static boolean |
satisfies(Graph existingGraph,
java.util.Set<Node> addSet,
java.util.Set<Node> compareSet,
Node current)
Private method for stepping through the adjacency lists and determining
if the graph is bipartite.
|
public static java.util.ArrayList<java.util.ArrayList<Node>> bipartiteDivision(Graph existingGraph)
public static java.util.ArrayList<java.util.ArrayList<Node>> constructArrayList(java.util.Set<Node> groupA, java.util.Set<Node> groupB)
Graph.addEdgesBetweenAllNodesInList(ArrayList)) possible.groupA - first output setgroupB - second output setprivate static boolean satisfies(Graph existingGraph, java.util.Set<Node> addSet, java.util.Set<Node> compareSet, Node current)
existingGraph - the Graph object to test against.addSet - the current set to add a node to based on the previous.compareSet - the current set to add adjacent nodes to.current - the current Node being compared.